package org.carl.base.feishu.bot.model;


import cn.hutool.json.JSONUtil;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.Getter;
import org.carl.base.feishu.bot.enums.MsgTypeEnum;

/**
 * @author Carl
 */
@Getter
public class TextMsgModel extends MsgModel {

    /**
     * 文本内容对象
     */
    private Text content;

    private TextMsgModel() {
        msg_type = MsgTypeEnum.text;
    }

    /**
     * 创建一个text对象
     *
     * @param text
     * @return
     */
    public static TextMsgModel text(String text) {
        TextMsgModel textMsgModel = new TextMsgModel();
        textMsgModel.content = new Text(text);
        return textMsgModel;
    }


    @Data
    @AllArgsConstructor
    public static class Text {
        private String text;
    }
}
